home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- REM This is SHORTCUT.BAT
- REM Adapted from J. Kevin Wells in PC Magazine V9 N12
- IF %1!==! GOTO OOPS
- IF EXIST \BATCH\*.* GOTO START
- MD \BATCH
- :START
- SET OP=%PROMPT%
- ECHO PROMPT CD $P > T1.BAT
- COMMAND /C T1 > T2.BAT
- ECHO @ECHO OFF > \BATCH\%1.BAT
- FIND /V "$" T2.BAT | FIND /V "--" >> \BATCH\%1.BAT
- PROMPT=%OP%
- DEL T?.BAT
- ECHO Now you'll be able to type %1 at the DOS prompt
- ECHO to switch quickly into this subdirectory
- GOTO END
- :OOPS
- ECHO To create a shortcut command that will let you
- ECHO jump instantly into this subdirectory from any
- ECHO other directory, enter a shortcut name 8 or
- ECHO fewer characters long after the %0.
- ECHO.
- ECHO So if you want to CD into this subdirectory by
- ECHO typing just HOT at the DOS prompt, enter %0 HOT
- ECHO.
- ECHO Be sure your PATH includes a \BATCH subdirectory!
- :END
-